package com.example.lib_base_mvvm.utils;


import com.example.lib_base_mvvm.entity.GiftEntity;
import com.example.lib_base_mvvm.entity.PinglunEntity;
import com.example.lib_base_mvvm.entity.ResultEntity;
import com.example.lib_base_mvvm.entity.UserEntity;
import com.example.lib_base_mvvm.entity.VideoEntity;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface ApiServer {
    @POST(ConstantsUtils.LOGIN_URL)
    Observable<UserEntity> login(@Body RequestBody body);
    @POST(ConstantsUtils.REGISTER_URL)
    Observable<UserEntity> register(@Body RequestBody body);
    @GET(ConstantsUtils.VIDEO_URL)
    Observable<VideoEntity> video(@Query("currentPage") int page,@Query("pageSize") int size);
    @POST(ConstantsUtils.LOVE_URL)
    Observable<ResultEntity> love(@Query("videoId")int videoId);
    @POST(ConstantsUtils.NOLOVE_URL)
    Observable<ResultEntity> nolove(@Query("videoId")int videoId);
    @POST(ConstantsUtils.LOVEVIDEO_URL)
    Observable<VideoEntity> loveVideo();//点赞视频
    @POST(ConstantsUtils.GUANZHU_URL)
    Observable<ResultEntity> guanzhu(@Body RequestBody body);
    @GET(ConstantsUtils.PINGLUN_URL)
    Observable<PinglunEntity> pinglun(@Query("videoId")int videoId);
    @POST(ConstantsUtils.SENDPINGLUN_URL)
    Observable<PinglunEntity> sendpinglun(@Body RequestBody body);
    @GET(ConstantsUtils.GIFT_URL)
    Observable<GiftEntity> gift();
}
